.class final Llt/noframe/gpsfarmguide/dialogs/UpdateDialog$show$dialog$1;
.super Ljava/lang/Object;
.source "UpdateDialog.kt"

# interfaces
.implements Landroid/content/DialogInterface$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Llt/noframe/gpsfarmguide/dialogs/UpdateDialog;->show(Landroid/content/Context;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x18
    name = null
.end annotation


# instance fields
.field final synthetic $context:Landroid/content/Context;

.field final synthetic $fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;


# direct methods
.method constructor <init>(Llt/noframe/gpsfarmguide/analytics/FireAnalytics;Landroid/content/Context;)V
    .locals 0

    iput-object p1, p0, Llt/noframe/gpsfarmguide/dialogs/UpdateDialog$show$dialog$1;->$fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    iput-object p2, p0, Llt/noframe/gpsfarmguide/dialogs/UpdateDialog$show$dialog$1;->$context:Landroid/content/Context;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public final onClick(Landroid/content/DialogInterface;I)V
    .locals 4

    const-string p2, "android.intent.action.VIEW"

    .line 27
    iget-object v0, p0, Llt/noframe/gpsfarmguide/dialogs/UpdateDialog$show$dialog$1;->$fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;->sendUpdateUpdatePressed()V

    .line 29
    :try_start_0
    iget-object v0, p0, Llt/noframe/gpsfarmguide/dialogs/UpdateDialog$show$dialog$1;->$context:Landroid/content/Context;

    new-instance v1, Landroid/content/Intent;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "market://details?id="

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v3, p0, Llt/noframe/gpsfarmguide/dialogs/UpdateDialog$show$dialog$1;->$context:Landroid/content/Context;

    invoke-virtual {v3}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v2

    invoke-direct {v1, p2, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    invoke-virtual {v0, v1}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
    :try_end_0
    .catch Landroid/content/ActivityNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 31
    :catch_0
    iget-object v0, p0, Llt/noframe/gpsfarmguide/dialogs/UpdateDialog$show$dialog$1;->$context:Landroid/content/Context;

    new-instance v1, Landroid/content/Intent;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "https://play.google.com/store/apps/details?id="

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v3, p0, Llt/noframe/gpsfarmguide/dialogs/UpdateDialog$show$dialog$1;->$context:Landroid/content/Context;

    invoke-virtual {v3}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v2

    invoke-direct {v1, p2, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    invoke-virtual {v0, v1}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    .line 33
    :goto_0
    invoke-interface {p1}, Landroid/content/DialogInterface;->dismiss()V

    return-void
.end method
